﻿/*****************************************************************//**
 * @file   VAOneXMLAdaptorMaterialFoam.h
 * @brief  VAOne读写适配器泡沫材料
 * 
 * @author XingXuanCi (xingxuanci@diso.cn)
 * @date   2024-11-05
 *********************************************************************/
#ifndef VAOneXMLAdaptorMaterialFoam_H
#define VAOneXMLAdaptorMaterialFoam_H

#include "FITKVAOneXMLIOAPI.h"
#include "FITKAbstractVAOneXMLAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

namespace IO
{
    /**
     * @brief   VAOne读写适配器泡沫材料
     * @author  XingXuanCi (xingxuanci@diso.cn)
     * @date    2024-11-05
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorMaterialFoam : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorMaterialFoam);
    public:

        /**
         * @brief   构造函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        explicit VAOneXMLAdaptorMaterialFoam()= default;
        /**
         * @brief   析构函数
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        ~VAOneXMLAdaptorMaterialFoam() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool adaptW() override;

    private:
        /**
         * @brief   读取泡沫材料数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool readMaterialFoam();
        /**
         * @brief   写泡沫材料数据
         * @return  是否执行成功
         * @author  XingXuanCi (xingxuanci@diso.cn)
         * @date    2024-11-05
         */
        bool writeMaterialFoam();
};
    Register2FITKIOAdaptorFactory(VAOneXML, Acoustics::FITKAcousticsMaterialsFoam, VAOneXMLAdaptorMaterialFoam)
}

#endif // VAOneXMLAdaptorMaterialFoam_H
